package com.jungle.mvvm.sample.api;


import com.jungle.mvvm.sample.bean.CollectBean;
import com.jungle.mvvm.sample.bean.ListBean;
import com.jungle.mvvm.sample.bean.SameBean;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * @ClassName CollectApi
 * @Description 公众号接口
 * @Author Daniel
 * @Version V1.0.0
 */
public interface CollectApi {

    @POST("lg/collect/{id}/json")
    Observable<SameBean> collect(@Path("id") int id);

    @POST("lg/uncollect_originId/{id}/json")
    Observable<SameBean> uncollect(@Path("id") int id);

    @POST("lg/uncollect/{id}/json")
    Observable<SameBean> uncollect(@Path("id") int id, @Query("originId") int originId);

    @GET("lg/collect/list/{size}/json")
    Observable<ListBean<List<CollectBean>>> getCollectionList(@Path("size") int size);


}
